import {_decorator, Component, SystemEventType, director } from 'cc';
import { Game } from "./Game";
import { ScorePanel } from "./ScorePanel";

const { ccclass, property } = _decorator;

@ccclass('ButtonResume')
export class ButtonResume extends Component {

    private onTouchEnd(){
        this.node.getParent().getParent().getComponent(Game).initGame();
        Game.isPaused = false;
    }

    protected onLoad() {
        this.node.on(SystemEventType.TOUCH_END, this.onTouchEnd, this);
    }
}